home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / rsxwdk2s.zip / RSXWDK / LIBSRC / DOS / DOS4409.C < prev    next >
C/C++ Source or Header  |  1994-12-17  |  406b  |  26 lines

  1. #include <errno.h>
  2. #include <sys/doscalls.h>
  3.  
  4.  
  5. /*
  6. ** AH = 0x44 ; AL = 09
  7. ** BL = drive
  8. ** ret: 1/0 remote or -1
  9. */
  10. int dos_ioctl_remotedrive(unsigned char drive)
  11. {
  12.     struct REGPACK r;
  13.  
  14.     r.eax = 0x4409;
  15.     r.ebx = drive;
  16.  
  17.     _intr(0x21, &r);
  18.  
  19.     if (r.eflags & 1) {
  20.     _sys_doserror2errno( r.eax & 0xFFFF);
  21.     return (-1);
  22.     }
  23.     else
  24.     return (int) (r.edx & 0x1000) >> 12;
  25. }
  26.